package org.fsconnector.spi;

import java.io.File;

import javax.resource.ResourceException;
import javax.resource.spi.ActivationSpec;
import javax.resource.spi.BootstrapContext;
import javax.resource.spi.ResourceAdapter;
import javax.resource.spi.ResourceAdapterInternalException;
import javax.resource.spi.endpoint.MessageEndpointFactory;
import javax.transaction.xa.XAResource;

public class FSResourceAdapter implements ResourceAdapter {

	private File rootDir;

	public void endpointActivation(MessageEndpointFactory arg0, ActivationSpec arg1)
			throws ResourceException {
	// TODO Auto-generated method stub
	}

	public void endpointDeactivation(MessageEndpointFactory arg0, ActivationSpec arg1) {
	// TODO Auto-generated method stub
	}

	public XAResource[] getXAResources(ActivationSpec[] arg0) throws ResourceException {
		// TODO Auto-generated method stub
		return null;
	}

	public void start(BootstrapContext ctx) throws ResourceAdapterInternalException {
		// Do Nothing
	}

	public void stop() {
		// Do Nothing
	}

	public String getRootDir() {
		return rootDir.getAbsolutePath();
	}

	public void setRootDir(String rootDir) {
		this.rootDir = new File(rootDir);
	}

}
